package tech.hypersense.system.converter;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import tech.hypersense.system.model.entity.Menu;
import tech.hypersense.system.model.form.MenuForm;
import tech.hypersense.system.model.vo.MenuVO;

/**
 * @Author: HyperSense
 * @CreateTime: 2025-03-27
 * @Description: 菜单对象转换器
 * @Version: 1.0
 */
@Mapper(componentModel = "spring")
public interface MenuConverter {

    MenuVO toVo(Menu entity);

    @Mapping(target = "params", ignore = true)
    MenuForm toForm(Menu entity);

    @Mapping(target = "params", ignore = true)
    Menu toEntity(MenuForm menuForm);

}
